<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/common.css" />
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css" />
    <style>
		body{
			padding:5px;
			background-color:transparent;
		}
		.row{
			padding:5px;
			border:#DDDDDD 1px solid;
			-moz-border-radius: 5px;      /* Gecko browsers */
		    -webkit-border-radius: 5px;   /* Webkit browsers */
		    border-radius:5px;            /* W3C syntax */
		   	margin-bottom:10px;
		   	background:#FFF;
		}
	    hr{
	    	border:0;
	    	background-color:#F0F0E1;
	    	height:1px;
	    	margin-bottom:10px;
	    }
	    label{
	    	color:#AAA;
	    }
	    label span{
	    	color:#AAA;
	    }
	</style>
</head>
<body>
<div class="container-fluid" id="personalCenter"></div>
<div style="height:50px;"></div>
</body>
<script id="pageTpl" type="text/html">
<div class="row">
	<div itemId="{{ d.tid }}" tapmode="tapmode" onclick="openDetail(this)">
		<div class="col-xs-12">
			<h4 class="text-success">{{ d.title }}</h4>
		</div>
		<div class="col-xs-12">
			<p><span class="label label-default">Tags</span> {{ d.tags }}</p>
		</div>
		<div class="col-xs-12">
			<p><img src="{{ d.albums }}" class="img-responsive"></p>
		</div>
	</div>
	<div class="col-xs-12">
		<hr />
		<div class="col-xs-5">
			<label itemId="{{ d.id }}" tapmode="tapmode" onclick="delFavorites(this)">
				<span class="glyphicon glyphicon-heart"></span> 取消收藏
			</label>
		</div>
		<div class="col-xs-4">
			<label itemId="{{ d.tid }}" tapmode="tapmode" onclick="openShareMenu(this)">
				<span class="glyphicon glyphicon-share-alt"></span> 分享
			</label>
		</div>
		<div class="col-xs-3">
			<label itemId="{{ d.id }}" tapmode="tapmode" onclick="">
				<span class="glyphicon glyphicon-comment"></span> 评论
			</label>
		</div>
	</div>
</div>
</script>
<script id="pageTplNoImg" type="text/html">
<div class="row">
	<div itemId="{{ d.tid }}" tapmode="tapmode" onclick="openDetail(this)">
		<div class="col-xs-12">
			<h4 class="text-success">{{ d.title }}</h4>
		</div>
		<div class="col-xs-12">
			<p><span class="label label-default">Tags</span> {{ d.tags }}</p>
		</div>
	</div>
	<div class="col-xs-12">
		<hr />
		<div class="col-xs-5">
			<label itemId="{{ d.id }}" tapmode="tapmode" onclick="delFavorites(this)">
				<span class="glyphicon glyphicon-heart"></span> 取消收藏
			</label>
		</div>
		<div class="col-xs-4">
			<label itemId="{{ d.tid }}" tapmode="tapmode" onclick="openShareMenu(this)">
				<span class="glyphicon glyphicon-share-alt"></span> 分享
			</label>
		</div>
		<div class="col-xs-3">
			<label itemId="{{ d.id }}" tapmode="tapmode" onclick="">
				<span class="glyphicon glyphicon-comment"></span> 评论
			</label>
		</div>
	</div>
</div>
</script>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/laytpl.js"></script>
<script type="text/javascript" src="../script/DBapi.js"></script>
<script type="text/javascript" src="../script/zepto.min.js"></script>
<script type="text/javascript">

apiready = function(){
	loadFavoritesData("load");
	
	api.addEventListener({
		name:"scrolltobottom"	
	},function(ret,err){
		loadFavoritesData("load");
	});
	
	//设置下拉刷新功能
    api.setRefreshHeaderInfo({
        visible: true,
        // loadingImgae: 'wgt://image/refresh-white.png',
        bgColor: '#f2f2f2',
        textColor: '#4d4d4d',
        textDown: '下拉刷新...',
        textUp: '松开刷新...',
        showTime: true
    }, function(ret, err){
    	
    	refreshFavoritesData();
    	
    });
};
</script>
</html>